<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE DeriveFunctor         #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MultiParamTypeClasses #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE OverloadedStrings     #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables   #-}</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- | This module provides a 'FieldGrammarParser', one way to parse</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- @.cabal@ -like files.</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Fields can be specified multiple times in the .cabal files.  The order of</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- such entries is important, but the mutual ordering of different fields is</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- not.Also conditional sections are considered after non-conditional data.</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- The example of this silent-commutation quirk is the fact that</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- buildable: True</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- if os(linux)</span><span>
</span><span id="line-16"></span><span class="hs-comment">--   buildable: False</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- and</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- if os(linux)</span><span>
</span><span id="line-23"></span><span class="hs-comment">--   buildable: False</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- buildable: True</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-26"></span><span class="hs-comment">--</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- behave the same! This is the limitation of 'GeneralPackageDescription'</span><span>
</span><span id="line-28"></span><span class="hs-comment">-- structure.</span><span>
</span><span id="line-29"></span><span class="hs-comment">--</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- So we transform the list of fields @['Field' ann]@ into</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- a map of grouped ordinary fields and a list of lists of sections:</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- @'Fields' ann = 'Map' 'FieldName' ['NamelessField' ann]@ and @[['Section' ann]]@.</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- We need list of list of sections, because we need to distinguish situations</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- where there are fields in between. For example</span><span>
</span><span id="line-36"></span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-38"></span><span class="hs-comment">-- if flag(bytestring-lt-0_10_4)</span><span>
</span><span id="line-39"></span><span class="hs-comment">--   build-depends: bytestring &lt; 0.10.4</span><span>
</span><span id="line-40"></span><span class="hs-comment">--</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- default-language: Haskell2020</span><span>
</span><span id="line-42"></span><span class="hs-comment">--</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- else</span><span>
</span><span id="line-44"></span><span class="hs-comment">--   build-depends: bytestring &gt;= 0.10.4</span><span>
</span><span id="line-45"></span><span class="hs-comment">--</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- is obviously invalid specification.</span><span>
</span><span id="line-49"></span><span class="hs-comment">--</span><span>
</span><span id="line-50"></span><span class="hs-comment">-- We can parse 'Fields' like we parse @aeson@ objects, yet we use</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- slightly higher-level API, so we can process unspecified fields,</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- to report unknown fields and save custom @x-fields@.</span><span>
</span><span id="line-53"></span><span class="hs-comment">--</span><span>
</span><span id="line-54"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.FieldGrammar.Parsec</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-55"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier">ParsecFieldGrammar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#parseFieldGrammar"><span class="hs-identifier">parseFieldGrammar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFieldList"><span class="hs-identifier">fieldGrammarKnownFieldList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Auxiliary</span></span><span>
</span><span id="line-59"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Fields"><span class="hs-identifier">Fields</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#NamelessField"><span class="hs-identifier">NamelessField</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#namelessFieldAnn"><span class="hs-identifier">namelessFieldAnn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Section"><span class="hs-identifier">Section</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier">runFieldParser</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser%27"><span class="hs-identifier">runFieldParser'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier">fieldLinesToStream</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-special">)</span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>                   </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#dropWhileEnd"><span class="hs-identifier">dropWhileEnd</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Newtype.html"><span class="hs-identifier">Distribution.Compat.Newtype</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier">fromUTF8BS</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span>              </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span>           </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Strict.html#"><span class="hs-identifier">Data.Map.Strict</span></a></span><span>              </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Set.html#"><span class="hs-identifier">Data.Set</span></a></span><span>                     </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Set</span></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Utils.ShortText.html"><span class="hs-identifier">Distribution.Utils.ShortText</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">ShortText</span></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../parsec/src/Text.Parsec.html#"><span class="hs-identifier">Text.Parsec</span></a></span><span>                  </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../parsec/src/Text.Parsec.Error.html#"><span class="hs-identifier">Text.Parsec.Error</span></a></span><span>            </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html"><span class="hs-identifier">Distribution.CabalSpecVersion</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Class.html"><span class="hs-identifier">Distribution.FieldGrammar.Class</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html"><span class="hs-identifier">Distribution.Fields.Field</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html"><span class="hs-identifier">Distribution.Fields.ParseResult</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.FieldLineStream.html"><span class="hs-identifier">Distribution.Parsec.FieldLineStream</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html"><span class="hs-identifier">Distribution.Parsec.Position</span></a></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier">positionCol</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#positionRow"><span class="hs-identifier">positionRow</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- Auxiliary types</span><span>
</span><span id="line-92"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-keyword">type</span><span> </span><span id="Fields"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Fields"><span class="hs-identifier hs-var">Fields</span></a></span></span><span> </span><span id="local-6989586621679698143"><span class="annot"><a href="#local-6989586621679698143"><span class="hs-identifier hs-type">ann</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html#FieldName"><span class="hs-identifier hs-type">FieldName</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#NamelessField"><span class="hs-identifier hs-type">NamelessField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698143"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | Single field, without name, but with its annotation.</span><span>
</span><span id="line-97"></span><span class="hs-keyword">data</span><span> </span><span id="NamelessField"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#NamelessField"><span class="hs-identifier hs-var">NamelessField</span></a></span></span><span> </span><span id="local-6989586621679698464"><span class="annot"><a href="#local-6989586621679698464"><span class="hs-identifier hs-type">ann</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MkNamelessField"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-var">MkNamelessField</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679698464"><span class="hs-identifier hs-type">ann</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698464"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-98"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679698134"><span id="local-6989586621679698140"><span class="annot"><span class="annottext">NamelessField ann -&gt; NamelessField ann -&gt; Bool
(NamelessField ann -&gt; NamelessField ann -&gt; Bool)
-&gt; (NamelessField ann -&gt; NamelessField ann -&gt; Bool)
-&gt; Eq (NamelessField ann)
forall ann.
Eq ann =&gt;
NamelessField ann -&gt; NamelessField ann -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: NamelessField ann -&gt; NamelessField ann -&gt; Bool
$c/= :: forall ann.
Eq ann =&gt;
NamelessField ann -&gt; NamelessField ann -&gt; Bool
== :: NamelessField ann -&gt; NamelessField ann -&gt; Bool
$c== :: forall ann.
Eq ann =&gt;
NamelessField ann -&gt; NamelessField ann -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679698120"><span id="local-6989586621679698122"><span id="local-6989586621679698130"><span class="annot"><span class="annottext">Int -&gt; NamelessField ann -&gt; ShowS
[NamelessField ann] -&gt; ShowS
NamelessField ann -&gt; String
(Int -&gt; NamelessField ann -&gt; ShowS)
-&gt; (NamelessField ann -&gt; String)
-&gt; ([NamelessField ann] -&gt; ShowS)
-&gt; Show (NamelessField ann)
forall ann. Show ann =&gt; Int -&gt; NamelessField ann -&gt; ShowS
forall ann. Show ann =&gt; [NamelessField ann] -&gt; ShowS
forall ann. Show ann =&gt; NamelessField ann -&gt; String
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [NamelessField ann] -&gt; ShowS
$cshowList :: forall ann. Show ann =&gt; [NamelessField ann] -&gt; ShowS
show :: NamelessField ann -&gt; String
$cshow :: forall ann. Show ann =&gt; NamelessField ann -&gt; String
showsPrec :: Int -&gt; NamelessField ann -&gt; ShowS
$cshowsPrec :: forall ann. Show ann =&gt; Int -&gt; NamelessField ann -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679698110"><span id="local-6989586621679698116"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; NamelessField a -&gt; NamelessField b)
-&gt; (forall a b. a -&gt; NamelessField b -&gt; NamelessField a)
-&gt; Functor NamelessField
forall a b. a -&gt; NamelessField b -&gt; NamelessField a
forall a b. (a -&gt; b) -&gt; NamelessField a -&gt; NamelessField b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; NamelessField b -&gt; NamelessField a
$c&lt;$ :: forall a b. a -&gt; NamelessField b -&gt; NamelessField a
fmap :: forall a b. (a -&gt; b) -&gt; NamelessField a -&gt; NamelessField b
$cfmap :: forall a b. (a -&gt; b) -&gt; NamelessField a -&gt; NamelessField b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span id="local-6989586621679698455"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#namelessFieldAnn"><span class="hs-identifier hs-type">namelessFieldAnn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#NamelessField"><span class="hs-identifier hs-type">NamelessField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698455"><span class="hs-identifier hs-type">ann</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679698455"><span class="hs-identifier hs-type">ann</span></a></span></span><span>
</span><span id="line-101"></span><span id="namelessFieldAnn"><span class="annot"><span class="annottext">namelessFieldAnn :: forall ann. NamelessField ann -&gt; ann
</span><a href="Distribution.FieldGrammar.Parsec.html#namelessFieldAnn"><span class="hs-identifier hs-var hs-var">namelessFieldAnn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679698105"><span class="annot"><span class="annottext">ann
</span><a href="#local-6989586621679698105"><span class="hs-identifier hs-var">ann</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine ann]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ann
</span><a href="#local-6989586621679698105"><span class="hs-identifier hs-var">ann</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-comment">-- | The 'Section' constructor of 'Field'.</span><span>
</span><span id="line-104"></span><span class="hs-keyword">data</span><span> </span><span id="Section"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Section"><span class="hs-identifier hs-var">Section</span></a></span></span><span> </span><span id="local-6989586621679698447"><span class="annot"><a href="#local-6989586621679698447"><span class="hs-identifier hs-type">ann</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MkSection"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkSection"><span class="hs-identifier hs-var">MkSection</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698447"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#SectionArg"><span class="hs-identifier hs-type">SectionArg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698447"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#Field"><span class="hs-identifier hs-type">Field</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698447"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679698094"><span id="local-6989586621679698102"><span class="annot"><span class="annottext">Section ann -&gt; Section ann -&gt; Bool
(Section ann -&gt; Section ann -&gt; Bool)
-&gt; (Section ann -&gt; Section ann -&gt; Bool) -&gt; Eq (Section ann)
forall ann. Eq ann =&gt; Section ann -&gt; Section ann -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Section ann -&gt; Section ann -&gt; Bool
$c/= :: forall ann. Eq ann =&gt; Section ann -&gt; Section ann -&gt; Bool
== :: Section ann -&gt; Section ann -&gt; Bool
$c== :: forall ann. Eq ann =&gt; Section ann -&gt; Section ann -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679698079"><span id="local-6989586621679698081"><span id="local-6989586621679698090"><span class="annot"><span class="annottext">Int -&gt; Section ann -&gt; ShowS
[Section ann] -&gt; ShowS
Section ann -&gt; String
(Int -&gt; Section ann -&gt; ShowS)
-&gt; (Section ann -&gt; String)
-&gt; ([Section ann] -&gt; ShowS)
-&gt; Show (Section ann)
forall ann. Show ann =&gt; Int -&gt; Section ann -&gt; ShowS
forall ann. Show ann =&gt; [Section ann] -&gt; ShowS
forall ann. Show ann =&gt; Section ann -&gt; String
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Section ann] -&gt; ShowS
$cshowList :: forall ann. Show ann =&gt; [Section ann] -&gt; ShowS
show :: Section ann -&gt; String
$cshow :: forall ann. Show ann =&gt; Section ann -&gt; String
showsPrec :: Int -&gt; Section ann -&gt; ShowS
$cshowsPrec :: forall ann. Show ann =&gt; Int -&gt; Section ann -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679698065"><span id="local-6989586621679698075"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; Section a -&gt; Section b)
-&gt; (forall a b. a -&gt; Section b -&gt; Section a) -&gt; Functor Section
forall a b. a -&gt; Section b -&gt; Section a
forall a b. (a -&gt; b) -&gt; Section a -&gt; Section b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; Section b -&gt; Section a
$c&lt;$ :: forall a b. a -&gt; Section b -&gt; Section a
fmap :: forall a b. (a -&gt; b) -&gt; Section a -&gt; Section b
$cfmap :: forall a b. (a -&gt; b) -&gt; Section a -&gt; Section b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- ParsecFieldGrammar</span><span>
</span><span id="line-109"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-keyword">data</span><span> </span><span id="ParsecFieldGrammar"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier hs-var">ParsecFieldGrammar</span></a></span></span><span> </span><span id="local-6989586621679698446"><span class="annot"><a href="#local-6989586621679698446"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679698445"><span class="annot"><a href="#local-6989586621679698445"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ParsecFG"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span></span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-special">{</span><span> </span><span id="fieldGrammarKnownFields"><span class="annot"><span class="annottext">forall s a. ParsecFieldGrammar s a -&gt; Set FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFields"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownFields</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Set.Internal.html#Set"><span class="hs-identifier hs-type">Set</span></a></span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html#FieldName"><span class="hs-identifier hs-type">FieldName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="fieldGrammarKnownPrefixes"><span class="annot"><span class="annottext">forall s a. ParsecFieldGrammar s a -&gt; Set FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownPrefixes"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownPrefixes</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Set.Internal.html#Set"><span class="hs-identifier hs-type">Set</span></a></span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html#FieldName"><span class="hs-identifier hs-type">FieldName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="fieldGrammarParser"><span class="annot"><span class="annottext">forall s a.
ParsecFieldGrammar s a
-&gt; CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarParser"><span class="hs-identifier hs-var hs-var">fieldGrammarParser</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Fields"><span class="hs-identifier hs-type">Fields</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html#ParseResult"><span class="hs-identifier hs-type">ParseResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698445"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679698049"><span id="local-6989586621679698053"><span class="annot"><span class="annottext">(forall a b.
 (a -&gt; b) -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b)
-&gt; (forall a b.
    a -&gt; ParsecFieldGrammar s b -&gt; ParsecFieldGrammar s a)
-&gt; Functor (ParsecFieldGrammar s)
forall a b. a -&gt; ParsecFieldGrammar s b -&gt; ParsecFieldGrammar s a
forall a b.
(a -&gt; b) -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b
forall s a b. a -&gt; ParsecFieldGrammar s b -&gt; ParsecFieldGrammar s a
forall s a b.
(a -&gt; b) -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; ParsecFieldGrammar s b -&gt; ParsecFieldGrammar s a
$c&lt;$ :: forall s a b. a -&gt; ParsecFieldGrammar s b -&gt; ParsecFieldGrammar s a
fmap :: forall a b.
(a -&gt; b) -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b
$cfmap :: forall s a b.
(a -&gt; b) -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span id="local-6989586621679698432"><span id="local-6989586621679698433"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#parseFieldGrammar"><span class="hs-identifier hs-type">parseFieldGrammar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Fields"><span class="hs-identifier hs-type">Fields</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier hs-type">ParsecFieldGrammar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698433"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698432"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html#ParseResult"><span class="hs-identifier hs-type">ParseResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698432"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-119"></span><span id="parseFieldGrammar"><span class="annot"><span class="annottext">parseFieldGrammar :: forall s a.
CabalSpecVersion
-&gt; Fields Position -&gt; ParsecFieldGrammar s a -&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#parseFieldGrammar"><span class="hs-identifier hs-var hs-var">parseFieldGrammar</span></a></span></span><span> </span><span id="local-6989586621679698038"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679698038"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679698037"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679698037"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span id="local-6989586621679698036"><span class="annot"><span class="annottext">ParsecFieldGrammar s a
</span><a href="#local-6989586621679698036"><span class="hs-identifier hs-var">grammar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-120"></span><span>    </span><span class="annot"><span class="annottext">[(FieldName, [NamelessField Position])]
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FieldName -&gt; [NamelessField Position] -&gt; Bool)
-&gt; Fields Position -&gt; Fields Position
forall k a. (k -&gt; a -&gt; Bool) -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#filterWithKey"><span class="hs-identifier hs-var">Map.filterWithKey</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; Bool
forall {p}. FieldName -&gt; p -&gt; Bool
</span><a href="#local-6989586621679698032"><span class="hs-identifier hs-var">isUnknownField</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679698037"><span class="hs-identifier hs-var">fields</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((FieldName, [NamelessField Position]) -&gt; ParseResult ())
 -&gt; ParseResult ())
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679698031"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679698031"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679698030"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679698030"><span class="hs-identifier hs-var">nfields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-121"></span><span>        </span><span class="annot"><span class="annottext">[NamelessField Position]
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679698030"><span class="hs-identifier hs-var">nfields</span></a></span><span> </span><span class="annot"><span class="annottext">((NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ())
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679698029"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679698029"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-122"></span><span>            </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679698029"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="Distribution.Parsec.Warning.html#PWTUnknownField"><span class="hs-identifier hs-var">PWTUnknownField</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unknown field: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679698031"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-123"></span><span>            </span><span class="hs-comment">-- TODO: fields allowed in this section</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-comment">-- parse</span><span>
</span><span id="line-126"></span><span>    </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a
-&gt; CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
forall s a.
ParsecFieldGrammar s a
-&gt; CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarParser"><span class="hs-identifier hs-var hs-var">fieldGrammarParser</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a
</span><a href="#local-6989586621679698036"><span class="hs-identifier hs-var">grammar</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679698038"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679698037"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-129"></span><span>    </span><span id="local-6989586621679698032"><span class="annot"><span class="annottext">isUnknownField :: FieldName -&gt; p -&gt; Bool
</span><a href="#local-6989586621679698032"><span class="hs-identifier hs-var hs-var">isUnknownField</span></a></span></span><span> </span><span id="local-6989586621679698021"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679698021"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-130"></span><span>        </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679698021"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName -&gt; Bool
forall a. Ord a =&gt; a -&gt; Set a -&gt; Bool
</span><a href="../../containers/src/Data.Set.Internal.html#member"><span class="hs-operator hs-var">`Set.member`</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a -&gt; Set FieldName
forall s a. ParsecFieldGrammar s a -&gt; Set FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFields"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownFields</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a
</span><a href="#local-6989586621679698036"><span class="hs-identifier hs-var">grammar</span></a></span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; Bool) -&gt; Set FieldName -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; FieldName -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#isPrefixOf"><span class="hs-operator hs-var">`BS.isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679698021"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ParsecFieldGrammar s a -&gt; Set FieldName
forall s a. ParsecFieldGrammar s a -&gt; Set FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownPrefixes"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownPrefixes</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a
</span><a href="#local-6989586621679698036"><span class="hs-identifier hs-var">grammar</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span id="local-6989586621679698410"><span id="local-6989586621679698411"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFieldList"><span class="hs-identifier hs-type">fieldGrammarKnownFieldList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier hs-type">ParsecFieldGrammar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698411"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698410"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldName"><span class="hs-identifier hs-type">FieldName</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-134"></span><span id="fieldGrammarKnownFieldList"><span class="annot"><span class="annottext">fieldGrammarKnownFieldList :: forall s a. ParsecFieldGrammar s a -&gt; [FieldName]
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFieldList"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownFieldList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName -&gt; [FieldName]
forall a. Set a -&gt; [a]
</span><a href="../../containers/src/Data.Set.Internal.html#toList"><span class="hs-identifier hs-var">Set.toList</span></a></span><span> </span><span class="annot"><span class="annottext">(Set FieldName -&gt; [FieldName])
-&gt; (ParsecFieldGrammar s a -&gt; Set FieldName)
-&gt; ParsecFieldGrammar s a
-&gt; [FieldName]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a -&gt; Set FieldName
forall s a. ParsecFieldGrammar s a -&gt; Set FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldGrammarKnownFields"><span class="hs-identifier hs-var hs-var">fieldGrammarKnownFields</span></a></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621679698392"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679698004"><span id="local-6989586621679698006"><span id="local-6989586621679698008"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier hs-type">ParsecFieldGrammar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698392"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-137"></span><span>    </span><span id="local-6989586621679697997"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; ParsecFieldGrammar s a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679697996"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697996"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">CabalSpecVersion
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697996"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#pure"><span class="hs-pragma hs-type">pure</span></a></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>    </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697991"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697991"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679697990"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697990"><span class="hs-identifier hs-var">f'</span></a></span></span><span> </span><span id="local-6989586621679697989"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (a -&gt; b)
</span><a href="#local-6989586621679697989"><span class="hs-identifier hs-var">f''</span></a></span></span><span> </span><span id="local-6989586621679697988"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b.
ParsecFieldGrammar s (a -&gt; b)
-&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697987"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697987"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679697986"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697986"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679697985"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697985"><span class="hs-identifier hs-var">x''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult b)
-&gt; ParsecFieldGrammar s b
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Set FieldName -&gt; Set FieldName -&gt; Set FieldName
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697991"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697987"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Set FieldName -&gt; Set FieldName -&gt; Set FieldName
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var">mappend</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697990"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697986"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679697984"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697984"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697983"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697983"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (a -&gt; b)
</span><a href="#local-6989586621679697989"><span class="hs-identifier hs-var">f''</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697984"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697983"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="annot"><span class="annottext">ParseResult (a -&gt; b) -&gt; ParseResult a -&gt; ParseResult b
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697985"><span class="hs-identifier hs-var">x''</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697984"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697983"><span class="hs-identifier hs-var">fields</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-type">warnMultipleSingularFields</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html#FieldName"><span class="hs-identifier hs-type">FieldName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#NamelessField"><span class="hs-identifier hs-type">NamelessField</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html#ParseResult"><span class="hs-identifier hs-type">ParseResult</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span id="warnMultipleSingularFields"><span class="annot"><span class="annottext">warnMultipleSingularFields :: FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var hs-var">warnMultipleSingularFields</span></a></span></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; ParseResult ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span id="local-6989586621679697981"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697981"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697980"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697980"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679697979"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697979"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697978"><span class="annot"><span class="annottext">pos :: Position
</span><a href="#local-6989586621679697978"><span class="hs-identifier hs-var hs-var">pos</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NamelessField Position -&gt; Position
forall ann. NamelessField ann -&gt; ann
</span><a href="Distribution.FieldGrammar.Parsec.html#namelessFieldAnn"><span class="hs-identifier hs-var">namelessFieldAnn</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697980"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-150"></span><span>        </span><span id="local-6989586621679697977"><span class="annot"><span class="annottext">poss :: [Position]
</span><a href="#local-6989586621679697977"><span class="hs-identifier hs-var hs-var">poss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; Position)
-&gt; [NamelessField Position] -&gt; [Position]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position -&gt; Position
forall ann. NamelessField ann -&gt; ann
</span><a href="Distribution.FieldGrammar.Parsec.html#namelessFieldAnn"><span class="hs-identifier hs-var">namelessFieldAnn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697979"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-151"></span><span>    </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697978"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="Distribution.Parsec.Warning.html#PWTMultipleSingularField"><span class="hs-identifier hs-var">PWTMultipleSingularField</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-152"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The field &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697981"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is specified more than once at positions &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, &quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Position -&gt; String) -&gt; [Position] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; String
</span><a href="Distribution.Parsec.Position.html#showPos"><span class="hs-identifier hs-var">showPos</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697978"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; [Position] -&gt; [Position]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697977"><span class="hs-identifier hs-var">poss</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Class.html#FieldGrammar"><span class="hs-identifier hs-type">FieldGrammar</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.html#Parsec"><span class="hs-identifier hs-type">Parsec</span></a></span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFieldGrammar"><span class="hs-identifier hs-type">ParsecFieldGrammar</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621679697937"><span class="annot"><span class="annottext">blurFieldGrammar :: forall a b d.
ALens' a b -&gt; ParsecFieldGrammar b d -&gt; ParsecFieldGrammar a d
</span><a href="Distribution.FieldGrammar.Class.html#blurFieldGrammar"><span class="hs-identifier hs-var hs-var hs-var hs-var">blurFieldGrammar</span></a></span></span><span> </span><span class="annot"><span class="annottext">ALens' a b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697935"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697935"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679697934"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697934"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span id="local-6989586621679697933"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult d
</span><a href="#local-6989586621679697933"><span class="hs-identifier hs-var">parser</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult d)
-&gt; ParsecFieldGrammar a d
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697935"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697934"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult d
</span><a href="#local-6989586621679697933"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>    </span><span id="local-6989586621679697930"><span class="annot"><span class="annottext">uniqueFieldAla :: forall b a s.
(Parsec b, Newtype a b) =&gt;
FieldName -&gt; (a -&gt; b) -&gt; ALens' s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#uniqueFieldAla"><span class="hs-identifier hs-var hs-var hs-var hs-var">uniqueFieldAla</span></a></span></span><span> </span><span id="local-6989586621679697928"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621679697927"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697927"><span class="hs-identifier hs-var">_pack</span></a></span></span><span> </span><span id="local-6989586621679697926"><span class="annot"><span class="annottext">ALens' s a
</span><a href="#local-6989586621679697926"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697923"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-158"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-159"></span><span>        </span><span id="local-6989586621679697923"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697923"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697911"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697911"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697910"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697910"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697910"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-160"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Position -&gt; String -&gt; ParseResult a
forall a. Position -&gt; String -&gt; ParseResult a
</span><a href="Distribution.Fields.ParseResult.html#parseFatalFailure"><span class="hs-identifier hs-var">parseFatalFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="Distribution.Parsec.Position.html#zeroPos"><span class="hs-identifier hs-var">zeroPos</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult a) -&gt; String -&gt; ParseResult a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; field missing&quot;</span></span><span>
</span><span id="line-161"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Position -&gt; String -&gt; ParseResult a
forall a. Position -&gt; String -&gt; ParseResult a
</span><a href="Distribution.Fields.ParseResult.html#parseFatalFailure"><span class="hs-identifier hs-var">parseFatalFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="Distribution.Parsec.Position.html#zeroPos"><span class="hs-identifier hs-var">zeroPos</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult a) -&gt; String -&gt; ParseResult a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; field missing&quot;</span></span><span>
</span><span id="line-162"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697906"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697906"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697905"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697911"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697906"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-163"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697904"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697904"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697903"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697903"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697902"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697902"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-164"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697928"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697904"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-165"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty a -&gt; a
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty a -&gt; a) -&gt; ParseResult (NonEmpty a) -&gt; ParseResult a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult a)
-&gt; NonEmpty (NamelessField Position) -&gt; ParseResult (NonEmpty a)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697905"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697911"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697903"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697902"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span>        </span><span id="local-6989586621679697905"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697905"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697892"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697892"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697891"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697891"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697890"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697890"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-168"></span><span>            </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; b -&gt; a
forall o n. Newtype o n =&gt; (o -&gt; n) -&gt; n -&gt; o
</span><a href="Distribution.Compat.Newtype.html#unpack%27"><span class="hs-identifier hs-var">unpack'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697927"><span class="hs-identifier hs-var">_pack</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; ParseResult b -&gt; ParseResult a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Position
-&gt; ParsecParser b
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult b
forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var">runFieldParser</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697891"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser b
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697892"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697890"><span class="hs-identifier hs-var">fls</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>    </span><span id="local-6989586621679697887"><span class="annot"><span class="annottext">booleanFieldDef :: forall s.
FieldName -&gt; ALens' s Bool -&gt; Bool -&gt; ParsecFieldGrammar s Bool
</span><a href="Distribution.FieldGrammar.Class.html#booleanFieldDef"><span class="hs-identifier hs-var hs-var hs-var hs-var">booleanFieldDef</span></a></span></span><span> </span><span id="local-6989586621679697885"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697885"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621679697884"><span class="annot"><span class="annottext">ALens' s Bool
</span><a href="#local-6989586621679697884"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span id="local-6989586621679697883"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679697883"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult Bool)
-&gt; ParsecFieldGrammar s Bool
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697885"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult Bool
</span><a href="#local-6989586621679697882"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-171"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-172"></span><span>        </span><span id="local-6989586621679697882"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult Bool
</span><a href="#local-6989586621679697882"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697871"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697871"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697870"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697870"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697885"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697870"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-173"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ParseResult Bool
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679697883"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-174"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ParseResult Bool
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679697883"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-175"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697869"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697869"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult Bool
forall {a}.
Parsec a =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697868"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697871"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697869"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-176"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697867"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697867"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697866"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697866"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697865"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697865"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-177"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697885"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697867"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-178"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty Bool -&gt; Bool
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty Bool -&gt; Bool)
-&gt; ParseResult (NonEmpty Bool) -&gt; ParseResult Bool
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult Bool)
-&gt; NonEmpty (NamelessField Position) -&gt; ParseResult (NonEmpty Bool)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult Bool
forall {a}.
Parsec a =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697868"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697871"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697866"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697865"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>        </span><span id="local-6989586621679697868"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697868"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697861"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697861"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697860"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697860"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697859"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697859"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var">runFieldParser</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697860"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser a
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697861"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697859"><span class="hs-identifier hs-var">fls</span></a></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span>    </span><span id="local-6989586621679697856"><span class="annot"><span class="annottext">optionalFieldAla :: forall b a s.
(Parsec b, Newtype a b) =&gt;
FieldName
-&gt; (a -&gt; b) -&gt; ALens' s (Maybe a) -&gt; ParsecFieldGrammar s (Maybe a)
</span><a href="Distribution.FieldGrammar.Class.html#optionalFieldAla"><span class="hs-identifier hs-var hs-var hs-var hs-var">optionalFieldAla</span></a></span></span><span> </span><span id="local-6989586621679697854"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697854"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621679697853"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697853"><span class="hs-identifier hs-var">_pack</span></a></span></span><span> </span><span id="local-6989586621679697852"><span class="annot"><span class="annottext">ALens' s (Maybe a)
</span><a href="#local-6989586621679697852"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (Maybe a))
-&gt; ParsecFieldGrammar s (Maybe a)
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697854"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (Maybe a)
</span><a href="#local-6989586621679697851"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-183"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-184"></span><span>        </span><span id="local-6989586621679697851"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (Maybe a)
</span><a href="#local-6989586621679697851"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697843"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697843"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697842"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697842"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697854"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697842"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-185"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; ParseResult (Maybe a)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-186"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; ParseResult (Maybe a)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-187"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697841"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697841"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult (Maybe a)
</span><a href="#local-6989586621679697840"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697843"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697841"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-188"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697839"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697839"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697838"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697838"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697837"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697837"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-189"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697854"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697839"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-190"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty (Maybe a) -&gt; Maybe a
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty (Maybe a) -&gt; Maybe a)
-&gt; ParseResult (NonEmpty (Maybe a)) -&gt; ParseResult (Maybe a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult (Maybe a))
-&gt; NonEmpty (NamelessField Position)
-&gt; ParseResult (NonEmpty (Maybe a))
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult (Maybe a)
</span><a href="#local-6989586621679697840"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697843"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697838"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697837"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span>        </span><span id="local-6989586621679697840"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult (Maybe a)
</span><a href="#local-6989586621679697840"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697830"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697830"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697829"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697829"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697828"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697828"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697828"><span class="hs-identifier hs-var">fls</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; ParseResult (Maybe a)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-194"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; (b -&gt; a) -&gt; b -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; b -&gt; a
forall o n. Newtype o n =&gt; (o -&gt; n) -&gt; n -&gt; o
</span><a href="Distribution.Compat.Newtype.html#unpack%27"><span class="hs-identifier hs-var">unpack'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697853"><span class="hs-identifier hs-var">_pack</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; Maybe a) -&gt; ParseResult b -&gt; ParseResult (Maybe a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Position
-&gt; ParsecParser b
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult b
forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var">runFieldParser</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697829"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser b
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697830"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697828"><span class="hs-identifier hs-var">fls</span></a></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>    </span><span id="local-6989586621679697823"><span class="annot"><span class="annottext">optionalFieldDefAla :: forall b a s.
(Parsec b, Newtype a b, Eq a) =&gt;
FieldName -&gt; (a -&gt; b) -&gt; ALens' s a -&gt; a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#optionalFieldDefAla"><span class="hs-identifier hs-var hs-var hs-var hs-var">optionalFieldDefAla</span></a></span></span><span> </span><span id="local-6989586621679697821"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697821"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621679697820"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697820"><span class="hs-identifier hs-var">_pack</span></a></span></span><span> </span><span id="local-6989586621679697819"><span class="annot"><span class="annottext">ALens' s a
</span><a href="#local-6989586621679697819"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span id="local-6989586621679697818"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697818"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697821"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697817"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-197"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-198"></span><span>        </span><span id="local-6989586621679697817"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697817"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697809"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697809"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697808"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697808"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697821"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697808"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-199"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697818"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-200"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697818"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-201"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697807"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697807"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697806"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697809"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697807"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-202"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697805"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697805"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697804"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697804"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697803"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697803"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-203"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697821"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697805"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-204"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty a -&gt; a
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty a -&gt; a) -&gt; ParseResult (NonEmpty a) -&gt; ParseResult a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult a)
-&gt; NonEmpty (NamelessField Position) -&gt; ParseResult (NonEmpty a)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697806"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697809"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697804"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697803"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span>        </span><span id="local-6989586621679697806"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697806"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697796"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697796"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697795"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697795"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697794"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697794"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697794"><span class="hs-identifier hs-var">fls</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697818"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-208"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; b -&gt; a
forall o n. Newtype o n =&gt; (o -&gt; n) -&gt; n -&gt; o
</span><a href="Distribution.Compat.Newtype.html#unpack%27"><span class="hs-identifier hs-var">unpack'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697820"><span class="hs-identifier hs-var">_pack</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; ParseResult b -&gt; ParseResult a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Position
-&gt; ParsecParser b
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult b
forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var">runFieldParser</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697795"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser b
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697796"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697794"><span class="hs-identifier hs-var">fls</span></a></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span>    </span><span id="local-6989586621679697793"><span class="annot"><span class="annottext">freeTextField :: forall s.
FieldName
-&gt; ALens' s (Maybe String) -&gt; ParsecFieldGrammar s (Maybe String)
</span><a href="Distribution.FieldGrammar.Class.html#freeTextField"><span class="hs-identifier hs-var hs-var hs-var hs-var">freeTextField</span></a></span></span><span> </span><span id="local-6989586621679697791"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697791"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ALens' s (Maybe String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion
    -&gt; Fields Position -&gt; ParseResult (Maybe String))
-&gt; ParsecFieldGrammar s (Maybe String)
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697791"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (Maybe String)
</span><a href="#local-6989586621679697790"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-211"></span><span>        </span><span id="local-6989586621679697790"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult (Maybe String)
</span><a href="#local-6989586621679697790"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697780"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697780"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697779"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697779"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697791"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697779"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-212"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; ParseResult (Maybe String)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-213"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; ParseResult (Maybe String)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-214"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697778"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697778"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
-&gt; NamelessField Position -&gt; ParseResult (Maybe String)
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f (Maybe String)
</span><a href="#local-6989586621679697777"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697780"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697778"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-215"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697776"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697776"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697775"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697775"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697774"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697774"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-216"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697791"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697776"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-217"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty (Maybe String) -&gt; Maybe String
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty (Maybe String) -&gt; Maybe String)
-&gt; ParseResult (NonEmpty (Maybe String))
-&gt; ParseResult (Maybe String)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult (Maybe String))
-&gt; NonEmpty (NamelessField Position)
-&gt; ParseResult (NonEmpty (Maybe String))
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion
-&gt; NamelessField Position -&gt; ParseResult (Maybe String)
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f (Maybe String)
</span><a href="#local-6989586621679697777"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697780"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697775"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697774"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>        </span><span id="local-6989586621679697777"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; f (Maybe String)
</span><a href="#local-6989586621679697777"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697766"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697766"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697765"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697765"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697764"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697764"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697764"><span class="hs-identifier hs-var">fls</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; f (Maybe String)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-221"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697766"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="Distribution.CabalSpecVersion.html#CabalSpecV3_0"><span class="hs-identifier hs-var">CabalSpecV3_0</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; f (Maybe String)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; [FieldLine Position] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var">fieldlinesToFreeText3</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697765"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697764"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; f (Maybe String)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; String
forall ann. [FieldLine ann] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-var">fieldlinesToFreeText</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697764"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>    </span><span id="local-6989586621679697760"><span class="annot"><span class="annottext">freeTextFieldDef :: forall s.
FieldName -&gt; ALens' s String -&gt; ParsecFieldGrammar s String
</span><a href="Distribution.FieldGrammar.Class.html#freeTextFieldDef"><span class="hs-identifier hs-var hs-var hs-var hs-var">freeTextFieldDef</span></a></span></span><span> </span><span id="local-6989586621679697758"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697758"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ALens' s String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult String)
-&gt; ParsecFieldGrammar s String
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697758"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult String
</span><a href="#local-6989586621679697757"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-225"></span><span>        </span><span id="local-6989586621679697757"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult String
</span><a href="#local-6989586621679697757"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697744"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697744"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697743"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697743"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697758"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697743"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-226"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ParseResult String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-227"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ParseResult String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-228"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697742"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697742"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult String
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f String
</span><a href="#local-6989586621679697741"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697744"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697742"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-229"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697740"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697740"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697739"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697739"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697738"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697738"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-230"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697758"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697740"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-231"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty String -&gt; String
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty String -&gt; String)
-&gt; ParseResult (NonEmpty String) -&gt; ParseResult String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult String)
-&gt; NonEmpty (NamelessField Position)
-&gt; ParseResult (NonEmpty String)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult String
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f String
</span><a href="#local-6989586621679697741"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697744"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697739"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697738"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span>        </span><span id="local-6989586621679697741"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; f String
</span><a href="#local-6989586621679697741"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697729"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697729"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697728"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697728"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697727"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697727"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697727"><span class="hs-identifier hs-var">fls</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; f String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-235"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697729"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="Distribution.CabalSpecVersion.html#CabalSpecV3_0"><span class="hs-identifier hs-var">CabalSpecV3_0</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; f String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; [FieldLine Position] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var">fieldlinesToFreeText3</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697728"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697727"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; f String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; String
forall ann. [FieldLine ann] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-var">fieldlinesToFreeText</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697727"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span>    </span><span class="hs-comment">-- freeTextFieldDefST = defaultFreeTextFieldDefST</span><span>
</span><span id="line-239"></span><span>    </span><span id="local-6989586621679697726"><span class="annot"><span class="annottext">freeTextFieldDefST :: forall s.
FieldName -&gt; ALens' s ShortText -&gt; ParsecFieldGrammar s ShortText
</span><a href="Distribution.FieldGrammar.Class.html#freeTextFieldDefST"><span class="hs-identifier hs-var hs-var hs-var hs-var">freeTextFieldDefST</span></a></span></span><span> </span><span id="local-6989586621679697724"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697724"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ALens' s ShortText
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult ShortText)
-&gt; ParsecFieldGrammar s ShortText
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697724"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult ShortText
</span><a href="#local-6989586621679697723"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-240"></span><span>        </span><span id="local-6989586621679697723"><span class="annot"><span class="annottext">parser :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult ShortText
</span><a href="#local-6989586621679697723"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697710"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697710"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697709"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697709"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; Fields Position -&gt; Maybe [NamelessField Position]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697724"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697709"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-241"></span><span>            </span><span class="annot"><span class="annottext">Maybe [NamelessField Position]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; ParseResult ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">ShortText
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-242"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; ParseResult ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">ShortText
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-243"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679697708"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697708"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult ShortText
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f ShortText
</span><a href="#local-6989586621679697707"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697710"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697708"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-244"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697706"><span class="annot"><span class="annottext">xs :: [NamelessField Position]
</span><a href="#local-6989586621679697706"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697705"><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697705"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697704"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697704"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-245"></span><span>                </span><span class="annot"><span class="annottext">FieldName -&gt; [NamelessField Position] -&gt; ParseResult ()
</span><a href="Distribution.FieldGrammar.Parsec.html#warnMultipleSingularFields"><span class="hs-identifier hs-var">warnMultipleSingularFields</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697724"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697706"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-246"></span><span>                </span><span class="annot"><span class="annottext">NonEmpty ShortText -&gt; ShortText
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#last"><span class="hs-identifier hs-var">NE.last</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty ShortText -&gt; ShortText)
-&gt; ParseResult (NonEmpty ShortText) -&gt; ParseResult ShortText
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult ShortText)
-&gt; NonEmpty (NamelessField Position)
-&gt; ParseResult (NonEmpty ShortText)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult ShortText
forall {f :: * -&gt; *}.
Applicative f =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; f ShortText
</span><a href="#local-6989586621679697707"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697710"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NamelessField Position
</span><a href="#local-6989586621679697705"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">NamelessField Position
-&gt; [NamelessField Position] -&gt; NonEmpty (NamelessField Position)
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697704"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span>        </span><span id="local-6989586621679697707"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; f ShortText
</span><a href="#local-6989586621679697707"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697696"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697696"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697695"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697695"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697694"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697694"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697694"><span class="hs-identifier hs-var">fls</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-249"></span><span>            </span><span class="hs-special">[</span><span class="hs-special">]</span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; f ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">ShortText
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-250"></span><span>            </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679697692"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697692"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; f ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; ShortText
</span><a href="Distribution.Utils.ShortText.html#unsafeFromUTF8BS"><span class="hs-identifier hs-var">ShortText.unsafeFromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697692"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>            </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697696"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="Distribution.CabalSpecVersion.html#CabalSpecV3_0"><span class="hs-identifier hs-var">CabalSpecV3_0</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; f ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ShortText
</span><a href="Distribution.Utils.ShortText.html#toShortText"><span class="hs-identifier hs-var">ShortText.toShortText</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ShortText) -&gt; String -&gt; ShortText
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; [FieldLine Position] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var">fieldlinesToFreeText3</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697695"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697694"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; f ShortText
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ShortText
</span><a href="Distribution.Utils.ShortText.html#toShortText"><span class="hs-identifier hs-var">ShortText.toShortText</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ShortText) -&gt; String -&gt; ShortText
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; String
forall ann. [FieldLine ann] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-var">fieldlinesToFreeText</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697694"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>
</span><span id="line-254"></span><span>    </span><span id="local-6989586621679697684"><span class="annot"><span class="annottext">monoidalFieldAla :: forall b a s.
(Parsec b, Monoid a, Newtype a b) =&gt;
FieldName -&gt; (a -&gt; b) -&gt; ALens' s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#monoidalFieldAla"><span class="hs-identifier hs-var hs-var hs-var hs-var">monoidalFieldAla</span></a></span></span><span> </span><span id="local-6989586621679697682"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697682"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621679697681"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697681"><span class="hs-identifier hs-var">_pack</span></a></span></span><span> </span><span id="local-6989586621679697680"><span class="annot"><span class="annottext">ALens' s a
</span><a href="#local-6989586621679697680"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697682"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
forall {t :: * -&gt; *}.
Traversable t =&gt;
CabalSpecVersion
-&gt; Map FieldName (t (NamelessField Position)) -&gt; ParseResult a
</span><a href="#local-6989586621679697679"><span class="hs-identifier hs-var">parser</span></a></span><span>
</span><span id="line-255"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>        </span><span id="local-6989586621679697679"><span class="annot"><span class="annottext">parser :: CabalSpecVersion
-&gt; Map FieldName (t (NamelessField Position)) -&gt; ParseResult a
</span><a href="#local-6989586621679697679"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697665"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697665"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697664"><span class="annot"><span class="annottext">Map FieldName (t (NamelessField Position))
</span><a href="#local-6989586621679697664"><span class="hs-identifier hs-var">fields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FieldName
-&gt; Map FieldName (t (NamelessField Position))
-&gt; Maybe (t (NamelessField Position))
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697682"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">Map FieldName (t (NamelessField Position))
</span><a href="#local-6989586621679697664"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-257"></span><span>            </span><span class="annot"><span class="annottext">Maybe (t (NamelessField Position))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-258"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679697663"><span class="annot"><span class="annottext">t (NamelessField Position)
</span><a href="#local-6989586621679697663"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; t b -&gt; a
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; b -&gt; a
forall o n. Newtype o n =&gt; (o -&gt; n) -&gt; n -&gt; o
</span><a href="Distribution.Compat.Newtype.html#unpack%27"><span class="hs-identifier hs-var">unpack'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679697681"><span class="hs-identifier hs-var">_pack</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(t b -&gt; a) -&gt; ParseResult (t b) -&gt; ParseResult a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(NamelessField Position -&gt; ParseResult b)
-&gt; t (NamelessField Position) -&gt; ParseResult (t b)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult b
forall {a}.
Parsec a =&gt;
CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697661"><span class="hs-identifier hs-var">parseOne</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697665"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t (NamelessField Position)
</span><a href="#local-6989586621679697663"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span>        </span><span id="local-6989586621679697661"><span class="annot"><span class="annottext">parseOne :: CabalSpecVersion -&gt; NamelessField Position -&gt; ParseResult a
</span><a href="#local-6989586621679697661"><span class="hs-identifier hs-var hs-var">parseOne</span></a></span></span><span> </span><span id="local-6989586621679697657"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697657"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697656"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697656"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697655"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697655"><span class="hs-identifier hs-var">fls</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var">runFieldParser</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697656"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser a
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697657"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697655"><span class="hs-identifier hs-var">fls</span></a></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>    </span><span id="local-6989586621679697650"><span class="annot"><span class="annottext">prefixedFields :: forall s.
FieldName
-&gt; ALens' s [(String, String)]
-&gt; ParsecFieldGrammar s [(String, String)]
</span><a href="Distribution.FieldGrammar.Class.html#prefixedFields"><span class="hs-identifier hs-var hs-var hs-var hs-var">prefixedFields</span></a></span></span><span> </span><span id="local-6989586621679697648"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697648"><span class="hs-identifier hs-var">fnPfx</span></a></span></span><span> </span><span id="local-6989586621679697647"><span class="annot"><span class="annottext">ALens' s [(String, String)]
</span><a href="#local-6989586621679697647"><span class="hs-identifier hs-var">_extract</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion
    -&gt; Fields Position -&gt; ParseResult [(String, String)])
-&gt; ParsecFieldGrammar s [(String, String)]
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697648"><span class="hs-identifier hs-var">fnPfx</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">CabalSpecVersion
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697646"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697646"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; ParseResult [(String, String)]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fields Position -&gt; [(String, String)]
</span><a href="#local-6989586621679697645"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697646"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-264"></span><span>        </span><span class="annot"><a href="#local-6989586621679697645"><span class="hs-identifier hs-type">parser</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#Fields"><span class="hs-identifier hs-type">Fields</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-265"></span><span>        </span><span id="local-6989586621679697645"><span class="annot"><span class="annottext">parser :: Fields Position -&gt; [(String, String)]
</span><a href="#local-6989586621679697645"><span class="hs-identifier hs-var hs-var">parser</span></a></span></span><span> </span><span id="local-6989586621679697644"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697644"><span class="hs-identifier hs-var">values</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Position, (String, String))] -&gt; [(String, String)]
forall {b}. [(Position, b)] -&gt; [b]
</span><a href="#local-6989586621679697643"><span class="hs-identifier hs-var">reorder</span></a></span><span> </span><span class="annot"><span class="annottext">([(Position, (String, String))] -&gt; [(String, String)])
-&gt; [(Position, (String, String))] -&gt; [(String, String)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((FieldName, [NamelessField Position])
 -&gt; [(Position, (String, String))])
-&gt; [(FieldName, [NamelessField Position])]
-&gt; [(Position, (String, String))]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName, [NamelessField Position])
-&gt; [(Position, (String, String))]
forall {ann}.
(FieldName, [NamelessField ann]) -&gt; [(ann, (String, String))]
</span><a href="#local-6989586621679697641"><span class="hs-identifier hs-var">convert</span></a></span><span> </span><span class="annot"><span class="annottext">([(FieldName, [NamelessField Position])]
 -&gt; [(Position, (String, String))])
-&gt; [(FieldName, [NamelessField Position])]
-&gt; [(Position, (String, String))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((FieldName, [NamelessField Position]) -&gt; Bool)
-&gt; [(FieldName, [NamelessField Position])]
-&gt; [(FieldName, [NamelessField Position])]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName, [NamelessField Position]) -&gt; Bool
forall {b}. (FieldName, b) -&gt; Bool
</span><a href="#local-6989586621679697640"><span class="hs-identifier hs-var">match</span></a></span><span> </span><span class="annot"><span class="annottext">([(FieldName, [NamelessField Position])]
 -&gt; [(FieldName, [NamelessField Position])])
-&gt; [(FieldName, [NamelessField Position])]
-&gt; [(FieldName, [NamelessField Position])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697644"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-266"></span><span>
</span><span id="line-267"></span><span>        </span><span id="local-6989586621679697640"><span class="annot"><span class="annottext">match :: (FieldName, b) -&gt; Bool
</span><a href="#local-6989586621679697640"><span class="hs-identifier hs-var hs-var">match</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697639"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697639"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697648"><span class="hs-identifier hs-var">fnPfx</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; FieldName -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#isPrefixOf"><span class="hs-operator hs-var">`BS.isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697639"><span class="hs-identifier hs-var">fn</span></a></span><span>
</span><span id="line-268"></span><span>        </span><span id="local-6989586621679697641"><span class="annot"><span class="annottext">convert :: (FieldName, [NamelessField ann]) -&gt; [(ann, (String, String))]
</span><a href="#local-6989586621679697641"><span class="hs-identifier hs-var hs-var">convert</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697638"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697638"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697637"><span class="annot"><span class="annottext">[NamelessField ann]
</span><a href="#local-6989586621679697637"><span class="hs-identifier hs-var">fields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-269"></span><span>            </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ann
</span><a href="#local-6989586621679697636"><span class="hs-identifier hs-var">pos</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697638"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679697635"><span class="hs-identifier hs-var">trim</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; String) -&gt; FieldName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine ann] -&gt; FieldName
forall ann. [FieldLine ann] -&gt; FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToBS"><span class="hs-identifier hs-var">fieldlinesToBS</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697633"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697636"><span class="annot"><span class="annottext">ann
</span><a href="#local-6989586621679697636"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697633"><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697633"><span class="hs-identifier hs-var">fls</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[NamelessField ann]
</span><a href="#local-6989586621679697637"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-271"></span><span>            </span><span class="hs-special">]</span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-comment">-- hack: recover the order of prefixed fields</span><span>
</span><span id="line-273"></span><span>        </span><span id="local-6989586621679697643"><span class="annot"><span class="annottext">reorder :: [(Position, b)] -&gt; [b]
</span><a href="#local-6989586621679697643"><span class="hs-identifier hs-var hs-var">reorder</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Position, b) -&gt; b) -&gt; [(Position, b)] -&gt; [b]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Position, b) -&gt; b
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">([(Position, b)] -&gt; [b])
-&gt; ([(Position, b)] -&gt; [(Position, b)]) -&gt; [(Position, b)] -&gt; [b]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Position, b) -&gt; (Position, b) -&gt; Ordering)
-&gt; [(Position, b)] -&gt; [(Position, b)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Position, b) -&gt; Position)
-&gt; (Position, b) -&gt; (Position, b) -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(Position, b) -&gt; Position
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>        </span><span class="annot"><a href="#local-6989586621679697635"><span class="hs-identifier hs-type">trim</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-275"></span><span>        </span><span id="local-6989586621679697635"><span class="annot"><span class="annottext">trim :: ShowS
</span><a href="#local-6989586621679697635"><span class="hs-identifier hs-var hs-var">trim</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ShowS
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#dropWhile"><span class="hs-identifier hs-var">dropWhile</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ShowS
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#dropWhileEnd"><span class="hs-identifier hs-var">dropWhileEnd</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621679697626"><span class="annot"><span class="annottext">availableSince :: forall a s.
CabalSpecVersion
-&gt; a -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#availableSince"><span class="hs-identifier hs-var hs-var hs-var hs-var">availableSince</span></a></span></span><span> </span><span id="local-6989586621679697624"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697624"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span id="local-6989586621679697623"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697623"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697622"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697622"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621679697621"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697621"><span class="hs-identifier hs-var">prefixes</span></a></span></span><span> </span><span id="local-6989586621679697620"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697620"><span class="hs-identifier hs-var">parser</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697622"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697621"><span class="hs-identifier hs-var">prefixes</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697619"><span class="hs-identifier hs-var">parser'</span></a></span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-279"></span><span>        </span><span id="local-6989586621679697619"><span class="annot"><span class="annottext">parser' :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697619"><span class="hs-identifier hs-var hs-var">parser'</span></a></span></span><span> </span><span id="local-6989586621679697604"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697604"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697603"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697603"><span class="hs-identifier hs-var">values</span></a></span></span><span>
</span><span id="line-280"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697604"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697624"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697620"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697604"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697603"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-281"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-282"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697601"><span class="annot"><span class="annottext">unknownFields :: Fields Position
</span><a href="#local-6989586621679697601"><span class="hs-identifier hs-var hs-var">unknownFields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; Map FieldName () -&gt; Fields Position
forall k a b. Ord k =&gt; Map k a -&gt; Map k b -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#intersection"><span class="hs-identifier hs-var">Map.intersection</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697603"><span class="hs-identifier hs-var">values</span></a></span><span> </span><span class="annot"><span class="annottext">(Map FieldName () -&gt; Fields Position)
-&gt; Map FieldName () -&gt; Fields Position
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; ()) -&gt; Set FieldName -&gt; Map FieldName ()
forall k a. (k -&gt; a) -&gt; Set k -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#fromSet"><span class="hs-identifier hs-var">Map.fromSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; FieldName -&gt; ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697622"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-283"></span><span>                </span><span class="annot"><span class="annottext">[(FieldName, [NamelessField Position])]
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697601"><span class="hs-identifier hs-var">unknownFields</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((FieldName, [NamelessField Position]) -&gt; ParseResult ())
 -&gt; ParseResult ())
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679697597"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697597"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697596"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697596"><span class="hs-identifier hs-var">fields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-284"></span><span>                    </span><span class="annot"><span class="annottext">[NamelessField Position]
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697596"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="annot"><span class="annottext">((NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ())
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697595"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697595"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-285"></span><span>                        </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697595"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="Distribution.Parsec.Warning.html#PWTUnknownField"><span class="hs-identifier hs-var">PWTUnknownField</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-286"></span><span>                            </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The field &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697597"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is available only since the Cabal specification version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; String
</span><a href="Distribution.CabalSpecVersion.html#showCabalSpecVersion"><span class="hs-identifier hs-var">showCabalSpecVersion</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697624"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;. This field will be ignored.&quot;</span></span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span>                </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697623"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span>    </span><span id="local-6989586621679697593"><span class="annot"><span class="annottext">availableSinceWarn :: forall s a.
CabalSpecVersion
-&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#availableSinceWarn"><span class="hs-identifier hs-var hs-var hs-var hs-var">availableSinceWarn</span></a></span></span><span> </span><span id="local-6989586621679697591"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697591"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697590"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697590"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621679697589"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697589"><span class="hs-identifier hs-var">prefixes</span></a></span></span><span> </span><span id="local-6989586621679697588"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697588"><span class="hs-identifier hs-var">parser</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697590"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697589"><span class="hs-identifier hs-var">prefixes</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697587"><span class="hs-identifier hs-var">parser'</span></a></span><span>
</span><span id="line-291"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-292"></span><span>        </span><span id="local-6989586621679697587"><span class="annot"><span class="annottext">parser' :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697587"><span class="hs-identifier hs-var hs-var">parser'</span></a></span></span><span> </span><span id="local-6989586621679697573"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697573"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697572"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697572"><span class="hs-identifier hs-var">values</span></a></span></span><span>
</span><span id="line-293"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697573"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697591"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697588"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697573"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697572"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-294"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-295"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697570"><span class="annot"><span class="annottext">unknownFields :: Fields Position
</span><a href="#local-6989586621679697570"><span class="hs-identifier hs-var hs-var">unknownFields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; Map FieldName () -&gt; Fields Position
forall k a b. Ord k =&gt; Map k a -&gt; Map k b -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#intersection"><span class="hs-identifier hs-var">Map.intersection</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697572"><span class="hs-identifier hs-var">values</span></a></span><span> </span><span class="annot"><span class="annottext">(Map FieldName () -&gt; Fields Position)
-&gt; Map FieldName () -&gt; Fields Position
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; ()) -&gt; Set FieldName -&gt; Map FieldName ()
forall k a. (k -&gt; a) -&gt; Set k -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#fromSet"><span class="hs-identifier hs-var">Map.fromSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; FieldName -&gt; ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697590"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-296"></span><span>                </span><span class="annot"><span class="annottext">[(FieldName, [NamelessField Position])]
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697570"><span class="hs-identifier hs-var">unknownFields</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((FieldName, [NamelessField Position]) -&gt; ParseResult ())
 -&gt; ParseResult ())
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679697569"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697569"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697568"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697568"><span class="hs-identifier hs-var">fields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-297"></span><span>                    </span><span class="annot"><span class="annottext">[NamelessField Position]
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697568"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="annot"><span class="annottext">((NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ())
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697567"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697567"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-298"></span><span>                        </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697567"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="Distribution.Parsec.Warning.html#PWTUnknownField"><span class="hs-identifier hs-var">PWTUnknownField</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-299"></span><span>                            </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The field &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697569"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is available only since the Cabal specification version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; String
</span><a href="Distribution.CabalSpecVersion.html#showCabalSpecVersion"><span class="hs-identifier hs-var">showCabalSpecVersion</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697591"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span>                </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697588"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697573"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697572"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span>    </span><span class="hs-comment">-- todo we know about this field</span><span>
</span><span id="line-305"></span><span>    </span><span id="local-6989586621679697566"><span class="annot"><span class="annottext">deprecatedSince :: forall s a.
CabalSpecVersion
-&gt; String -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#deprecatedSince"><span class="hs-identifier hs-var hs-var hs-var hs-var">deprecatedSince</span></a></span></span><span> </span><span id="local-6989586621679697564"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697564"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span id="local-6989586621679697563"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697563"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697562"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697562"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621679697561"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697561"><span class="hs-identifier hs-var">prefixes</span></a></span></span><span> </span><span id="local-6989586621679697560"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697560"><span class="hs-identifier hs-var">parser</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697562"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697561"><span class="hs-identifier hs-var">prefixes</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697559"><span class="hs-identifier hs-var">parser'</span></a></span><span>
</span><span id="line-306"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-307"></span><span>        </span><span id="local-6989586621679697559"><span class="annot"><span class="annottext">parser' :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697559"><span class="hs-identifier hs-var hs-var">parser'</span></a></span></span><span> </span><span id="local-6989586621679697545"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697545"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697544"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697544"><span class="hs-identifier hs-var">values</span></a></span></span><span>
</span><span id="line-308"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697545"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697564"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-309"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697542"><span class="annot"><span class="annottext">deprecatedFields :: Fields Position
</span><a href="#local-6989586621679697542"><span class="hs-identifier hs-var hs-var">deprecatedFields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; Map FieldName () -&gt; Fields Position
forall k a b. Ord k =&gt; Map k a -&gt; Map k b -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#intersection"><span class="hs-identifier hs-var">Map.intersection</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697544"><span class="hs-identifier hs-var">values</span></a></span><span> </span><span class="annot"><span class="annottext">(Map FieldName () -&gt; Fields Position)
-&gt; Map FieldName () -&gt; Fields Position
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; ()) -&gt; Set FieldName -&gt; Map FieldName ()
forall k a. (k -&gt; a) -&gt; Set k -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#fromSet"><span class="hs-identifier hs-var">Map.fromSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; FieldName -&gt; ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697562"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-310"></span><span>                </span><span class="annot"><span class="annottext">[(FieldName, [NamelessField Position])]
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697542"><span class="hs-identifier hs-var">deprecatedFields</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((FieldName, [NamelessField Position]) -&gt; ParseResult ())
 -&gt; ParseResult ())
-&gt; ((FieldName, [NamelessField Position]) -&gt; ParseResult ())
-&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679697541"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697541"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697540"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697540"><span class="hs-identifier hs-var">fields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-311"></span><span>                    </span><span class="annot"><span class="annottext">[NamelessField Position]
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697540"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="annot"><span class="annottext">((NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ())
-&gt; (NamelessField Position -&gt; ParseResult ()) -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697539"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697539"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-312"></span><span>                        </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697539"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="Distribution.Parsec.Warning.html#PWTDeprecatedField"><span class="hs-identifier hs-var">PWTDeprecatedField</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-313"></span><span>                            </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The field &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697541"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is deprecated in the Cabal specification version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; String
</span><a href="Distribution.CabalSpecVersion.html#showCabalSpecVersion"><span class="hs-identifier hs-var">showCabalSpecVersion</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697564"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;. &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697563"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span>                </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697560"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697545"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697544"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697560"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697545"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697544"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span>    </span><span id="local-6989586621679697537"><span class="annot"><span class="annottext">removedIn :: forall s a.
CabalSpecVersion
-&gt; String -&gt; ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#removedIn"><span class="hs-identifier hs-var hs-var hs-var hs-var">removedIn</span></a></span></span><span> </span><span id="local-6989586621679697535"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697535"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span id="local-6989586621679697534"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697534"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-type">ParsecFG</span></a></span><span> </span><span id="local-6989586621679697533"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697533"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621679697532"><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697532"><span class="hs-identifier hs-var">prefixes</span></a></span></span><span> </span><span id="local-6989586621679697531"><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697531"><span class="hs-identifier hs-var">parser</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697533"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697532"><span class="hs-identifier hs-var">prefixes</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697530"><span class="hs-identifier hs-var">parser'</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-320"></span><span>        </span><span id="local-6989586621679697530"><span class="annot"><span class="annottext">parser' :: CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697530"><span class="hs-identifier hs-var hs-var">parser'</span></a></span></span><span> </span><span id="local-6989586621679697520"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697520"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697519"><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697519"><span class="hs-identifier hs-var">values</span></a></span></span><span>
</span><span id="line-321"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697520"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697535"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-322"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697515"><span class="annot"><span class="annottext">msg' :: String
</span><a href="#local-6989586621679697515"><span class="hs-identifier hs-var hs-var">msg'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697534"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697534"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-323"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697513"><span class="annot"><span class="annottext">unknownFields :: Fields Position
</span><a href="#local-6989586621679697513"><span class="hs-identifier hs-var hs-var">unknownFields</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; Map FieldName () -&gt; Fields Position
forall k a b. Ord k =&gt; Map k a -&gt; Map k b -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#intersection"><span class="hs-identifier hs-var">Map.intersection</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697519"><span class="hs-identifier hs-var">values</span></a></span><span> </span><span class="annot"><span class="annottext">(Map FieldName () -&gt; Fields Position)
-&gt; Map FieldName () -&gt; Fields Position
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldName -&gt; ()) -&gt; Set FieldName -&gt; Map FieldName ()
forall k a. (k -&gt; a) -&gt; Set k -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#fromSet"><span class="hs-identifier hs-var">Map.fromSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; FieldName -&gt; ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
</span><a href="#local-6989586621679697533"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-324"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697512"><span class="annot"><span class="annottext">namePos :: [(FieldName, Position)]
</span><a href="#local-6989586621679697512"><span class="hs-identifier hs-var hs-var">namePos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-325"></span><span>                      </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697511"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697510"><span class="hs-identifier hs-var">pos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697511"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697511"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697509"><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697509"><span class="hs-identifier hs-var">fields</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Fields Position -&gt; [(FieldName, [NamelessField Position])]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697513"><span class="hs-identifier hs-var">unknownFields</span></a></span><span>
</span><span id="line-327"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#MkNamelessField"><span class="hs-identifier hs-type">MkNamelessField</span></a></span><span> </span><span id="local-6989586621679697510"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697510"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[NamelessField Position]
</span><a href="#local-6989586621679697509"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-328"></span><span>                      </span><span class="hs-special">]</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697500"><span class="annot"><span class="annottext">makeMsg :: a -&gt; String
</span><a href="#local-6989586621679697500"><span class="hs-identifier hs-var hs-var">makeMsg</span></a></span></span><span> </span><span id="local-6989586621679697499"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697499"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The field &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697499"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is removed in the Cabal specification version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; String
</span><a href="Distribution.CabalSpecVersion.html#showCabalSpecVersion"><span class="hs-identifier hs-var">showCabalSpecVersion</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697535"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697515"><span class="hs-identifier hs-var">msg'</span></a></span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[(FieldName, Position)]
</span><a href="#local-6989586621679697512"><span class="hs-identifier hs-var">namePos</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-333"></span><span>                    </span><span class="hs-comment">-- no fields =&gt; proceed (with empty values, to be sure)</span><span>
</span><span id="line-334"></span><span>                    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697531"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697520"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span>                    </span><span class="hs-comment">-- if there's single field: fail fatally with it</span><span>
</span><span id="line-337"></span><span>                    </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679697498"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697498"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697497"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697497"><span class="hs-identifier hs-var">pos</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679697496"><span class="annot"><span class="annottext">[(FieldName, Position)]
</span><a href="#local-6989586621679697496"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-338"></span><span>                        </span><span class="annot"><span class="annottext">[(FieldName, Position)]
-&gt; ((FieldName, Position) -&gt; ParseResult ()) -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="annot"><span class="annottext">[(FieldName, Position)]
</span><a href="#local-6989586621679697496"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">(((FieldName, Position) -&gt; ParseResult ()) -&gt; ParseResult ())
-&gt; ((FieldName, Position) -&gt; ParseResult ()) -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679697495"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697495"><span class="hs-identifier hs-var">name'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697494"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697494"><span class="hs-identifier hs-var">pos'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Position -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseFailure"><span class="hs-identifier hs-var">parseFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697494"><span class="hs-identifier hs-var">pos'</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult ()) -&gt; String -&gt; ParseResult ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="#local-6989586621679697500"><span class="hs-identifier hs-var">makeMsg</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697495"><span class="hs-identifier hs-var">name'</span></a></span><span>
</span><span id="line-339"></span><span>                        </span><span class="annot"><span class="annottext">Position -&gt; String -&gt; ParseResult a
forall a. Position -&gt; String -&gt; ParseResult a
</span><a href="Distribution.Fields.ParseResult.html#parseFatalFailure"><span class="hs-identifier hs-var">parseFatalFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697497"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult a) -&gt; String -&gt; ParseResult a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="#local-6989586621679697500"><span class="hs-identifier hs-var">makeMsg</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697498"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a
</span><a href="#local-6989586621679697531"><span class="hs-identifier hs-var">parser</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697520"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><a href="#local-6989586621679697519"><span class="hs-identifier hs-var">values</span></a></span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621679697491"><span class="annot"><span class="annottext">knownField :: forall s. FieldName -&gt; ParsecFieldGrammar s ()
</span><a href="Distribution.FieldGrammar.Class.html#knownField"><span class="hs-identifier hs-var hs-var hs-var hs-var">knownField</span></a></span></span><span> </span><span id="local-6989586621679697489"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697489"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult ())
-&gt; ParsecFieldGrammar s ()
forall s a.
Set FieldName
-&gt; Set FieldName
-&gt; (CabalSpecVersion -&gt; Fields Position -&gt; ParseResult a)
-&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Parsec.html#ParsecFG"><span class="hs-identifier hs-var">ParsecFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; Set FieldName
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">Set.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697489"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Set FieldName
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">Set.empty</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">CabalSpecVersion
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Fields Position
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; ParseResult ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span>    </span><span id="local-6989586621679697488"><span class="annot"><span class="annottext">hiddenField :: forall s a. ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
</span><a href="Distribution.FieldGrammar.Class.html#hiddenField"><span class="hs-identifier hs-var hs-var hs-var hs-var">hiddenField</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecFieldGrammar s a -&gt; ParsecFieldGrammar s a
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-346"></span><span>
</span><span id="line-347"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-348"></span><span class="hs-comment">-- Parsec</span><span>
</span><span id="line-349"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span id="local-6989586621679698248"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser%27"><span class="hs-identifier hs-type">runFieldParser'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#ParsecParser"><span class="hs-identifier hs-type">ParsecParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698248"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Parsec.FieldLineStream.html#FieldLineStream"><span class="hs-identifier hs-type">FieldLineStream</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html#ParseResult"><span class="hs-identifier hs-type">ParseResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698248"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-352"></span><span id="runFieldParser%27"><span class="annot"><span class="annottext">runFieldParser' :: forall a.
[Position]
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; FieldLineStream
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser%27"><span class="hs-identifier hs-var hs-var">runFieldParser'</span></a></span></span><span> </span><span id="local-6989586621679697476"><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697476"><span class="hs-identifier hs-var">inputPoss</span></a></span></span><span> </span><span id="local-6989586621679697475"><span class="annot"><span class="annottext">ParsecParser a
</span><a href="#local-6989586621679697475"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679697474"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697474"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697473"><span class="annot"><span class="annottext">FieldLineStream
</span><a href="#local-6989586621679697473"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Parsec FieldLineStream [PWarning] (a, [PWarning])
-&gt; [PWarning]
-&gt; String
-&gt; FieldLineStream
-&gt; Either ParseError (a, [PWarning])
forall s t u a.
Stream s Identity t =&gt;
Parsec s u a -&gt; u -&gt; String -&gt; s -&gt; Either ParseError a
</span><a href="../../parsec/src/Text.Parsec.Prim.html#runParser"><span class="hs-identifier hs-var">P.runParser</span></a></span><span> </span><span class="annot"><span class="annottext">Parsec FieldLineStream [PWarning] (a, [PWarning])
</span><a href="#local-6989586621679697471"><span class="hs-identifier hs-var">p'</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&lt;field&gt;&quot;</span></span><span> </span><span class="annot"><span class="annottext">FieldLineStream
</span><a href="#local-6989586621679697473"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-353"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697470"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697470"><span class="hs-identifier hs-var">pok</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697469"><span class="annot"><span class="annottext">[PWarning]
</span><a href="#local-6989586621679697469"><span class="hs-identifier hs-var">ws</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-354"></span><span>        </span><span class="annot"><span class="annottext">(PWarning -&gt; ParseResult ()) -&gt; [PWarning] -&gt; ParseResult ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#traverse_"><span class="hs-identifier hs-var">traverse_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.Warning.html#PWarning"><span class="hs-identifier hs-type">PWarning</span></a></span><span> </span><span id="local-6989586621679697466"><span class="annot"><span class="annottext">PWarnType
</span><a href="#local-6989586621679697466"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679697465"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697465"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679697464"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697464"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Position -&gt; PWarnType -&gt; String -&gt; ParseResult ()
</span><a href="Distribution.Fields.ParseResult.html#parseWarning"><span class="hs-identifier hs-var">parseWarning</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; Position
</span><a href="#local-6989586621679697463"><span class="hs-identifier hs-var">mapPosition</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697465"><span class="hs-identifier hs-var">pos</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">PWarnType
</span><a href="#local-6989586621679697466"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697464"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[PWarning]
</span><a href="#local-6989586621679697469"><span class="hs-identifier hs-var">ws</span></a></span><span>
</span><span id="line-355"></span><span>        </span><span class="annot"><span class="annottext">a -&gt; ParseResult a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697470"><span class="hs-identifier hs-var">pok</span></a></span><span>
</span><span id="line-356"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679697462"><span class="annot"><span class="annottext">ParseError
</span><a href="#local-6989586621679697462"><span class="hs-identifier hs-var">err</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-357"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697461"><span class="annot"><span class="annottext">ppos :: SourcePos
</span><a href="#local-6989586621679697461"><span class="hs-identifier hs-var hs-var">ppos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParseError -&gt; SourcePos
</span><a href="../../parsec/src/Text.Parsec.Error.html#errorPos"><span class="hs-identifier hs-var">P.errorPos</span></a></span><span> </span><span class="annot"><span class="annottext">ParseError
</span><a href="#local-6989586621679697462"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-358"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697459"><span class="annot"><span class="annottext">epos :: Position
</span><a href="#local-6989586621679697459"><span class="hs-identifier hs-var hs-var">epos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position -&gt; Position
</span><a href="#local-6989586621679697463"><span class="hs-identifier hs-var">mapPosition</span></a></span><span> </span><span class="annot"><span class="annottext">(Position -&gt; Position) -&gt; Position -&gt; Position
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Position
</span><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-var">Position</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourcePos -&gt; Int
</span><a href="../../parsec/src/Text.Parsec.Pos.html#sourceLine"><span class="hs-identifier hs-var">P.sourceLine</span></a></span><span> </span><span class="annot"><span class="annottext">SourcePos
</span><a href="#local-6989586621679697461"><span class="hs-identifier hs-var">ppos</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourcePos -&gt; Int
</span><a href="../../parsec/src/Text.Parsec.Pos.html#sourceColumn"><span class="hs-identifier hs-var">P.sourceColumn</span></a></span><span> </span><span class="annot"><span class="annottext">SourcePos
</span><a href="#local-6989586621679697461"><span class="hs-identifier hs-var">ppos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679697455"><span class="annot"><span class="annottext">msg :: String
</span><a href="#local-6989586621679697455"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; String -&gt; String -&gt; String -&gt; [Message] -&gt; String
</span><a href="../../parsec/src/Text.Parsec.Error.html#showErrorMessages"><span class="hs-identifier hs-var">P.showErrorMessages</span></a></span><span>
</span><span id="line-361"></span><span>                </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;or&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unknown parse error&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;expecting&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unexpected&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;end of input&quot;</span></span><span>
</span><span id="line-362"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ParseError -&gt; [Message]
</span><a href="../../parsec/src/Text.Parsec.Error.html#errorMessages"><span class="hs-identifier hs-var">P.errorMessages</span></a></span><span> </span><span class="annot"><span class="annottext">ParseError
</span><a href="#local-6989586621679697462"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>        </span><span class="annot"><span class="annottext">Position -&gt; String -&gt; ParseResult a
forall a. Position -&gt; String -&gt; ParseResult a
</span><a href="Distribution.Fields.ParseResult.html#parseFatalFailure"><span class="hs-identifier hs-var">parseFatalFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697459"><span class="hs-identifier hs-var">epos</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ParseResult a) -&gt; String -&gt; ParseResult a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697455"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-365"></span><span>    </span><span id="local-6989586621679697471"><span class="annot"><span class="annottext">p' :: Parsec FieldLineStream [PWarning] (a, [PWarning])
</span><a href="#local-6989586621679697471"><span class="hs-identifier hs-var hs-var">p'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(a -&gt; [PWarning] -&gt; (a, [PWarning]))
-&gt; ParsecT FieldLineStream [PWarning] Identity ()
-&gt; ParsecT
     FieldLineStream
     [PWarning]
     Identity
     (a -&gt; [PWarning] -&gt; (a, [PWarning]))
forall (f :: * -&gt; *) a b. Functor f =&gt; a -&gt; f b -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%24"><span class="hs-operator hs-var">&lt;$</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT FieldLineStream [PWarning] Identity ()
forall s (m :: * -&gt; *) u. Stream s m Char =&gt; ParsecT s u m ()
</span><a href="../../parsec/src/Text.Parsec.Char.html#spaces"><span class="hs-identifier hs-var">P.spaces</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT
  FieldLineStream
  [PWarning]
  Identity
  (a -&gt; [PWarning] -&gt; (a, [PWarning]))
-&gt; ParsecT FieldLineStream [PWarning] Identity a
-&gt; ParsecT
     FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser a
-&gt; CabalSpecVersion
-&gt; ParsecT FieldLineStream [PWarning] Identity a
forall a.
ParsecParser a
-&gt; CabalSpecVersion -&gt; Parsec FieldLineStream [PWarning] a
</span><a href="Distribution.Parsec.html#unPP"><span class="hs-identifier hs-var hs-var">unPP</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser a
</span><a href="#local-6989586621679697475"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697474"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT
  FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
-&gt; ParsecT FieldLineStream [PWarning] Identity ()
-&gt; ParsecT
     FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%2A"><span class="hs-operator hs-var">&lt;*</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT FieldLineStream [PWarning] Identity ()
forall s (m :: * -&gt; *) u. Stream s m Char =&gt; ParsecT s u m ()
</span><a href="../../parsec/src/Text.Parsec.Char.html#spaces"><span class="hs-identifier hs-var">P.spaces</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT
  FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
-&gt; ParsecT FieldLineStream [PWarning] Identity ()
-&gt; ParsecT
     FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%2A"><span class="hs-operator hs-var">&lt;*</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT FieldLineStream [PWarning] Identity ()
forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m ()
</span><a href="../../parsec/src/Text.Parsec.Combinator.html#eof"><span class="hs-identifier hs-var">P.eof</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT
  FieldLineStream [PWarning] Identity ([PWarning] -&gt; (a, [PWarning]))
-&gt; ParsecT FieldLineStream [PWarning] Identity [PWarning]
-&gt; Parsec FieldLineStream [PWarning] (a, [PWarning])
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT FieldLineStream [PWarning] Identity [PWarning]
forall (m :: * -&gt; *) s u. Monad m =&gt; ParsecT s u m u
</span><a href="../../parsec/src/Text.Parsec.Prim.html#getState"><span class="hs-identifier hs-var">P.getState</span></a></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span>    </span><span class="hs-comment">-- Positions start from 1:1, not 0:0</span><span>
</span><span id="line-368"></span><span>    </span><span id="local-6989586621679697463"><span class="annot"><span class="annottext">mapPosition :: Position -&gt; Position
</span><a href="#local-6989586621679697463"><span class="hs-identifier hs-var hs-var">mapPosition</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span id="local-6989586621679697428"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697428"><span class="hs-identifier hs-var">prow</span></a></span></span><span> </span><span id="local-6989586621679697427"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697427"><span class="hs-identifier hs-var">pcol</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Position] -&gt; Position
forall {t}. (Ord t, Num t) =&gt; t -&gt; [Position] -&gt; Position
</span><a href="#local-6989586621679697426"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697428"><span class="hs-identifier hs-var">prow</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697476"><span class="hs-identifier hs-var">inputPoss</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-369"></span><span>        </span><span id="local-6989586621679697426"><span class="annot"><span class="annottext">go :: t -&gt; [Position] -&gt; Position
</span><a href="#local-6989586621679697426"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="Distribution.Parsec.Position.html#zeroPos"><span class="hs-identifier hs-var">zeroPos</span></a></span><span>
</span><span id="line-370"></span><span>        </span><span class="annot"><a href="#local-6989586621679697426"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span id="local-6989586621679697413"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697413"><span class="hs-identifier hs-var">row</span></a></span></span><span> </span><span id="local-6989586621679697412"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697412"><span class="hs-identifier hs-var">col</span></a></span></span><span class="hs-special">]</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Position
</span><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-var">Position</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697413"><span class="hs-identifier hs-var">row</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697412"><span class="hs-identifier hs-var">col</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697427"><span class="hs-identifier hs-var">pcol</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-371"></span><span>        </span><span class="annot"><a href="#local-6989586621679697426"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679697410"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679697410"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span id="local-6989586621679697409"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697409"><span class="hs-identifier hs-var">row</span></a></span></span><span> </span><span id="local-6989586621679697408"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697408"><span class="hs-identifier hs-var">col</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679697410"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Position
</span><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-var">Position</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697409"><span class="hs-identifier hs-var">row</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697408"><span class="hs-identifier hs-var">col</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697427"><span class="hs-identifier hs-var">pcol</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-372"></span><span>        </span><span class="annot"><a href="#local-6989586621679697426"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679697406"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679697406"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679697405"><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697405"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; [Position] -&gt; Position
</span><a href="#local-6989586621679697426"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679697406"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697405"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-373"></span><span>
</span><span id="line-374"></span><span id="local-6989586621679698314"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-type">runFieldParser</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#ParsecParser"><span class="hs-identifier hs-type">ParsecParser</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698314"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.ParseResult.html#ParseResult"><span class="hs-identifier hs-type">ParseResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698314"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-375"></span><span id="runFieldParser"><span class="annot"><span class="annottext">runFieldParser :: forall a.
Position
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; [FieldLine Position]
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser"><span class="hs-identifier hs-var hs-var">runFieldParser</span></a></span></span><span> </span><span id="local-6989586621679697404"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697404"><span class="hs-identifier hs-var">pp</span></a></span></span><span> </span><span id="local-6989586621679697403"><span class="annot"><span class="annottext">ParsecParser a
</span><a href="#local-6989586621679697403"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679697402"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697402"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679697401"><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697401"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Position]
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; FieldLineStream
-&gt; ParseResult a
forall a.
[Position]
-&gt; ParsecParser a
-&gt; CabalSpecVersion
-&gt; FieldLineStream
-&gt; ParseResult a
</span><a href="Distribution.FieldGrammar.Parsec.html#runFieldParser%27"><span class="hs-identifier hs-var">runFieldParser'</span></a></span><span> </span><span class="annot"><span class="annottext">[Position]
</span><a href="#local-6989586621679697400"><span class="hs-identifier hs-var">poss</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser a
</span><a href="#local-6989586621679697403"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679697402"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLine Position] -&gt; FieldLineStream
forall ann. [FieldLine ann] -&gt; FieldLineStream
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-var">fieldLinesToStream</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697401"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-376"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-377"></span><span>    </span><span id="local-6989586621679697400"><span class="annot"><span class="annottext">poss :: [Position]
</span><a href="#local-6989586621679697400"><span class="hs-identifier hs-var hs-var">poss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FieldLine Position -&gt; Position)
-&gt; [FieldLine Position] -&gt; [Position]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span id="local-6989586621679697399"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697399"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697399"><span class="hs-identifier hs-var">pos</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697401"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="annot"><span class="annottext">[Position] -&gt; [Position] -&gt; [Position]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697404"><span class="hs-identifier hs-var">pp</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- add &quot;default&quot; position</span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span id="local-6989586621679698278"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToBS"><span class="hs-identifier hs-type">fieldlinesToBS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698278"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">BS.ByteString</span></a></span></span><span>
</span><span id="line-380"></span><span id="fieldlinesToBS"><span class="annot"><span class="annottext">fieldlinesToBS :: forall ann. [FieldLine ann] -&gt; FieldName
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToBS"><span class="hs-identifier hs-var hs-var">fieldlinesToBS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; [FieldName] -&gt; FieldName
</span><a href="../../bytestring/src/Data.ByteString.html#intercalate"><span class="hs-identifier hs-var">BS.intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><span class="hs-string">&quot;\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">([FieldName] -&gt; FieldName)
-&gt; ([FieldLine ann] -&gt; [FieldName]) -&gt; [FieldLine ann] -&gt; FieldName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLine ann -&gt; FieldName) -&gt; [FieldLine ann] -&gt; [FieldName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">ann
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697394"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697394"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697394"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span class="hs-comment">-- Example package with dot lines</span><span>
</span><span id="line-383"></span><span class="hs-comment">-- http://hackage.haskell.org/package/copilot-cbmc-0.1/copilot-cbmc.cabal</span><span>
</span><span id="line-384"></span><span id="local-6989586621679698298"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-type">fieldlinesToFreeText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698298"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-385"></span><span id="fieldlinesToFreeText"><span class="annot"><span class="annottext">fieldlinesToFreeText :: forall ann. [FieldLine ann] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-var hs-var">fieldlinesToFreeText</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">ann
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><span class="hs-string">&quot;.&quot;</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span>
</span><span id="line-386"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText"><span class="hs-identifier hs-var">fieldlinesToFreeText</span></a></span><span> </span><span id="local-6989586621679697389"><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697389"><span class="hs-identifier hs-var">fls</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FieldLine ann -&gt; String) -&gt; [FieldLine ann] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLine ann -&gt; String
forall {ann}. FieldLine ann -&gt; String
</span><a href="#local-6989586621679697388"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697389"><span class="hs-identifier hs-var">fls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-387"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-388"></span><span>    </span><span id="local-6989586621679697388"><span class="annot"><span class="annottext">go :: FieldLine ann -&gt; String
</span><a href="#local-6989586621679697388"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">ann
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697381"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697381"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-389"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697380"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-390"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679697380"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-391"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>        </span><span id="local-6989586621679697380"><span class="annot"><span class="annottext">s :: String
</span><a href="#local-6989586621679697380"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679697379"><span class="hs-identifier hs-var">trim</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697381"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span>        </span><span class="annot"><a href="#local-6989586621679697379"><span class="hs-identifier hs-type">trim</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-395"></span><span>        </span><span id="local-6989586621679697379"><span class="annot"><span class="annottext">trim :: ShowS
</span><a href="#local-6989586621679697379"><span class="hs-identifier hs-var hs-var">trim</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ShowS
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#dropWhile"><span class="hs-identifier hs-var">dropWhile</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ShowS
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#dropWhileEnd"><span class="hs-identifier hs-var">dropWhileEnd</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span>
</span><span id="line-396"></span><span>
</span><span id="line-397"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-type">fieldlinesToFreeText3</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-398"></span><span id="fieldlinesToFreeText3"><span class="annot"><span class="annottext">fieldlinesToFreeText3 :: Position -&gt; [FieldLine Position] -&gt; String
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var hs-var">fieldlinesToFreeText3</span></a></span></span><span> </span><span class="annot"><span class="annottext">Position
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-399"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var">fieldlinesToFreeText3</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697378"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697378"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697378"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-400"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldlinesToFreeText3"><span class="hs-identifier hs-var">fieldlinesToFreeText3</span></a></span><span> </span><span id="local-6989586621679697377"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697377"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span id="local-6989586621679697376"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span></span><span> </span><span id="local-6989586621679697375"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697375"><span class="hs-identifier hs-var">bs1</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679697374"><span class="annot"><span class="annottext">fls2 :: [FieldLine Position]
</span><a href="#local-6989586621679697374"><span class="hs-identifier hs-var">fls2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span id="local-6989586621679697373"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697373"><span class="hs-identifier hs-var">pos2</span></a></span></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-401"></span><span>    </span><span class="hs-comment">-- if first line is on the same line with field name:</span><span>
</span><span id="line-402"></span><span>    </span><span class="hs-comment">-- the indentation level is either</span><span>
</span><span id="line-403"></span><span>    </span><span class="hs-comment">-- 1. the indentation of left most line in rest fields</span><span>
</span><span id="line-404"></span><span>    </span><span class="hs-comment">-- 2. the indentation of the first line</span><span>
</span><span id="line-405"></span><span>    </span><span class="hs-comment">-- whichever is leftmost</span><span>
</span><span id="line-406"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionRow"><span class="hs-identifier hs-var">positionRow</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697377"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionRow"><span class="hs-identifier hs-var">positionRow</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span>
</span><span id="line-407"></span><span>        </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697375"><span class="hs-identifier hs-var">bs1</span></a></span><span>
</span><span id="line-408"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(Position -&gt; FieldLine Position -&gt; (Position, String))
-&gt; Position -&gt; [FieldLine Position] -&gt; [String]
forall s a b. (s -&gt; a -&gt; (s, b)) -&gt; s -&gt; [a] -&gt; [b]
</span><a href="Distribution.FieldGrammar.Parsec.html#mealy"><span class="hs-identifier hs-var">mealy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Position -&gt; FieldLine Position -&gt; (Position, String)
</span><a href="#local-6989586621679697370"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697369"><span class="hs-identifier hs-var">mcol1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697374"><span class="hs-identifier hs-var">fls2</span></a></span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span>    </span><span class="hs-comment">-- otherwise, also indent the first line</span><span>
</span><span id="line-411"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span>
</span><span id="line-412"></span><span>        </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697367"><span class="hs-identifier hs-var">mcol2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span>
</span><span id="line-413"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697375"><span class="hs-identifier hs-var">bs1</span></a></span><span>
</span><span id="line-414"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(Position -&gt; FieldLine Position -&gt; (Position, String))
-&gt; Position -&gt; [FieldLine Position] -&gt; [String]
forall s a b. (s -&gt; a -&gt; (s, b)) -&gt; s -&gt; [a] -&gt; [b]
</span><a href="Distribution.FieldGrammar.Parsec.html#mealy"><span class="hs-identifier hs-var">mealy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Position -&gt; FieldLine Position -&gt; (Position, String)
</span><a href="#local-6989586621679697370"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697367"><span class="hs-identifier hs-var">mcol2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697374"><span class="hs-identifier hs-var">fls2</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-417"></span><span>    </span><span id="local-6989586621679697369"><span class="annot"><span class="annottext">mcol1 :: Int
</span><a href="#local-6989586621679697369"><span class="hs-identifier hs-var hs-var">mcol1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; FieldLine Position -&gt; Int)
-&gt; Int -&gt; [FieldLine Position] -&gt; Int
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679697362"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697362"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679697361"><span class="annot"><span class="annottext">FieldLine Position
</span><a href="#local-6989586621679697361"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">min</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697362"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int) -&gt; Int -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">(Position -&gt; Int) -&gt; Position -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLine Position -&gt; Position
forall ann. FieldLine ann -&gt; ann
</span><a href="Distribution.Fields.Field.html#fieldLineAnn"><span class="hs-identifier hs-var">fieldLineAnn</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLine Position
</span><a href="#local-6989586621679697361"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">min</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697373"><span class="hs-identifier hs-var">pos2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697374"><span class="hs-identifier hs-var">fls2</span></a></span><span>
</span><span id="line-418"></span><span>    </span><span id="local-6989586621679697367"><span class="annot"><span class="annottext">mcol2 :: Int
</span><a href="#local-6989586621679697367"><span class="hs-identifier hs-var hs-var">mcol2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; FieldLine Position -&gt; Int)
-&gt; Int -&gt; [FieldLine Position] -&gt; Int
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679697356"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697356"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679697355"><span class="annot"><span class="annottext">FieldLine Position
</span><a href="#local-6989586621679697355"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">min</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697356"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int) -&gt; Int -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">(Position -&gt; Int) -&gt; Position -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLine Position -&gt; Position
forall ann. FieldLine ann -&gt; ann
</span><a href="Distribution.Fields.Field.html#fieldLineAnn"><span class="hs-identifier hs-var">fieldLineAnn</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLine Position
</span><a href="#local-6989586621679697355"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697376"><span class="hs-identifier hs-var">pos1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLine Position]
</span><a href="#local-6989586621679697374"><span class="hs-identifier hs-var">fls2</span></a></span><span>
</span><span id="line-419"></span><span>
</span><span id="line-420"></span><span>    </span><span class="annot"><a href="#local-6989586621679697370"><span class="hs-identifier hs-type">mk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Parsec.Position.html#Position"><span class="hs-identifier hs-type">Position</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-421"></span><span>    </span><span id="local-6989586621679697370"><span class="annot"><span class="annottext">mk :: Int -&gt; Position -&gt; FieldLine Position -&gt; (Position, String)
</span><a href="#local-6989586621679697370"><span class="hs-identifier hs-var hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621679697354"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697354"><span class="hs-identifier hs-var">col</span></a></span></span><span> </span><span id="local-6989586621679697353"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697353"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span id="local-6989586621679697352"><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697352"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span id="local-6989586621679697351"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697351"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-422"></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697352"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-423"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697350"><span class="hs-identifier hs-var">newlines</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span>
</span><span id="line-424"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697349"><span class="hs-identifier hs-var">indent</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span>
</span><span id="line-425"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; String
</span><a href="Distribution.Utils.Generic.html#fromUTF8BS"><span class="hs-identifier hs-var">fromUTF8BS</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697351"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-426"></span><span>        </span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-428"></span><span>        </span><span id="local-6989586621679697350"><span class="annot"><span class="annottext">newlines :: Int
</span><a href="#local-6989586621679697350"><span class="hs-identifier hs-var hs-var">newlines</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionRow"><span class="hs-identifier hs-var">positionRow</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697352"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionRow"><span class="hs-identifier hs-var">positionRow</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697353"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-429"></span><span>        </span><span id="local-6989586621679697349"><span class="annot"><span class="annottext">indent :: Int
</span><a href="#local-6989586621679697349"><span class="hs-identifier hs-var hs-var">indent</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Position -&gt; Int
</span><a href="Distribution.Parsec.Position.html#positionCol"><span class="hs-identifier hs-var">positionCol</span></a></span><span> </span><span class="annot"><span class="annottext">Position
</span><a href="#local-6989586621679697352"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679697354"><span class="hs-identifier hs-var">col</span></a></span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span id="local-6989586621679698199"><span id="local-6989586621679698200"><span id="local-6989586621679698201"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#mealy"><span class="hs-identifier hs-type">mealy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679698201"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679698200"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679698201"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679698199"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679698201"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679698200"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679698199"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-432"></span><span id="mealy"><span class="annot"><span class="annottext">mealy :: forall s a b. (s -&gt; a -&gt; (s, b)) -&gt; s -&gt; [a] -&gt; [b]
</span><a href="Distribution.FieldGrammar.Parsec.html#mealy"><span class="hs-identifier hs-var hs-var">mealy</span></a></span></span><span> </span><span id="local-6989586621679697346"><span class="annot"><span class="annottext">s -&gt; a -&gt; (s, b)
</span><a href="#local-6989586621679697346"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; [a] -&gt; [b]
</span><a href="#local-6989586621679697345"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-433"></span><span>    </span><span id="local-6989586621679697345"><span class="annot"><span class="annottext">go :: s -&gt; [a] -&gt; [b]
</span><a href="#local-6989586621679697345"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">s
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-434"></span><span>    </span><span class="annot"><a href="#local-6989586621679697345"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679697344"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679697344"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679697343"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697343"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679697342"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679697342"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679697341"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679697341"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679697340"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679697340"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; a -&gt; (s, b)
</span><a href="#local-6989586621679697346"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679697344"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679697343"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679697340"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; [b] -&gt; [b]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">s -&gt; [a] -&gt; [b]
</span><a href="#local-6989586621679697345"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679697341"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679697342"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span id="local-6989586621679698207"><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-type">fieldLinesToStream</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679698207"><span class="hs-identifier hs-type">ann</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Parsec.FieldLineStream.html#FieldLineStream"><span class="hs-identifier hs-type">FieldLineStream</span></a></span></span><span>
</span><span id="line-437"></span><span id="fieldLinesToStream"><span class="annot"><span class="annottext">fieldLinesToStream :: forall ann. [FieldLine ann] -&gt; FieldLineStream
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-var hs-var">fieldLinesToStream</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldLineStream
</span><a href="Distribution.Parsec.FieldLineStream.html#fieldLineStreamEnd"><span class="hs-identifier hs-var">fieldLineStreamEnd</span></a></span><span>
</span><span id="line-438"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-var">fieldLinesToStream</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">ann
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697338"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697338"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; FieldLineStream
</span><a href="Distribution.Parsec.FieldLineStream.html#FLSLast"><span class="hs-identifier hs-var">FLSLast</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697338"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-439"></span><span class="annot"><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-var">fieldLinesToStream</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Fields.Field.html#FieldLine"><span class="hs-identifier hs-type">FieldLine</span></a></span><span> </span><span class="annot"><span class="annottext">ann
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679697336"><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697336"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679697335"><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697335"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldName -&gt; FieldLineStream -&gt; FieldLineStream
</span><a href="Distribution.Parsec.FieldLineStream.html#FLSCons"><span class="hs-identifier hs-var">FLSCons</span></a></span><span> </span><span class="annot"><span class="annottext">FieldName
</span><a href="#local-6989586621679697336"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLine ann] -&gt; FieldLineStream
forall ann. [FieldLine ann] -&gt; FieldLineStream
</span><a href="Distribution.FieldGrammar.Parsec.html#fieldLinesToStream"><span class="hs-identifier hs-var">fieldLinesToStream</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLine ann]
</span><a href="#local-6989586621679697335"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-440"></span></pre></body></html>